package cn.kgc.springboot.mp.controller;

import cn.kgc.springboot.mp.entity.User;
import cn.kgc.springboot.mp.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 课工场
 * @date 2024/11/29
 * @description
 */
@RestController
@RequestMapping("user")
public class UserController {


    @Autowired
    private UserService userService;

    @GetMapping("list")
    public List<User> userList(){
        return userService.list();
    }

}
